package top.ochiamalu.aioj.oauth;

import lombok.RequiredArgsConstructor;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import top.ochiamalu.aioj.oauth.platform.OAuthPlatform;

/**
 * oauth平台工厂
 *
 * @author ochiamalu
 * @date 2025/03/12
 */
@Component
@RequiredArgsConstructor
public class OAuthPlatformFactory {
    private final ApplicationContext applicationContext;

    public OAuthPlatform getPlatform(String platform) {
        return applicationContext.getBean(platform + "Platform", OAuthPlatform.class);
    }
} 